# Contributor: Sam Whited <sam@samwhited.com>
# Maintainer: Sam Whited <sam@samwhited.com>
pkgname=py3-pycares
_pkgname=pycares
pkgver=4.3.0
pkgrel=0
pkgdesc="A library for performing DNS resolutions using c-ares."
url="https://pypi.org/project/pycares/"
arch="all"
license="MIT"
depends="python3 py3-idna py3-cffi"
makedepends="py3-setuptools c-ares-dev python3-dev py3-gpep517 py3-wheel"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # tests not included in source package.

build() {
	export PYCARES_USE_SYSTEM_LIB=1
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
	install -Dm644 LICENSE README.rst -t "$pkgdir"/usr/share/licenses/$pkgname
}

sha512sums="
ffabb9abf3f131a373302a7992af6335bc25013f119dce51731e5e04999948c62c42444adac4427c856b14fbaa481266449a39ff0715c5d8a45517cb22c9e539  pycares-4.3.0.tar.gz
"
